#ifndef __MYOLDKEY_H_
#define __MYOLDKEY_H_

#include "stm32f1xx_hal.h"
#include "tim.h"

//#include "FreeRTOS.h"
//#include "cmsis_os.h"
//#include "task.h"
//#include "queue.h" //

struct keys_4
{
	uint16_t age;
	uint8_t short_flag;
	uint8_t long_flag;
	uint8_t press;

	uint8_t double_ageEN;
	uint8_t double_age;
	uint8_t double_flag;
};
extern struct keys_4 Key[5];

void KEY_GPIO_Init(void);

void key_serv(void);
void key_serv_long(void);
void key_serv_double(void);
#endif

/*********************************END OF FILE*********************************/


//    struct keys_4 TaskKey[5] = {0, 0, 0, 0, 0, 0, 0};
//        if (pdPASS == xQueueReceive(g_xQueueKey, &TaskKey, 0))
//        {
//            if (TaskKey[1].short_flag == 1)
//            {
//                OLED_Printf(0, 20, OLED_8X16, "  key1 press ");
//            }

//            if (TaskKey[1].long_flag == 1)
//            {
//                OLED_Printf(0, 20, OLED_8X16, "  key1 long   ");
//            }
//            if (TaskKey[1].double_flag == 1)
//            {
//                OLED_Printf(0, 20, OLED_8X16, "  key1 double  ");
//            }

//            if (TaskKey[2].short_flag == 1)
//            {
//                OLED_Printf(0, 20, OLED_8X16, "  key2 press ");
//            }
//            if (TaskKey[3].short_flag == 1)
//            {
//                OLED_Printf(0, 20, OLED_8X16, "  key3 press ");
//            }
//            if (TaskKey[4].short_flag == 1)
//            {
//                OLED_Printf(0, 20, OLED_8X16, "  key4 press ");
//            }

//            OLED_Update();
//        }



